package com.newtouch.bxzs.policy.controller;

import com.newtouch.bxzs.common.base.response.BaseResponse;
import com.newtouch.bxzs.common.base.response.RespGenerator;
import com.newtouch.bxzs.policy.model.bo.PreservationBO;
import com.newtouch.bxzs.policy.model.bo.enterprise.*;
import com.newtouch.bxzs.policy.model.bo.family.PolicyUserListBO;
import com.newtouch.bxzs.policy.model.vo.PolicyInfoPageVO;
import com.newtouch.bxzs.policy.model.vo.PolicyUserListVO;
import com.newtouch.bxzs.policy.model.vo.PreservationProgressInfoVO;
import com.newtouch.bxzs.policy.model.vo.enterprise.*;
import com.newtouch.bxzs.policy.service.EnterprisePolicyInsuranceService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;

/**
 * 企业单管理controller层--保险
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/7 10:12</td>
 * <td>linhongxi</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author linhongxi
 * @version 1.0.0
 * @since 1.0.0
 */
@ApiIgnore
@RestController
@SuppressWarnings("unchecked")
@RequestMapping("/enterprisePolicyInsurance")
public class EnterprisePolicyInsuranceController {
    /** 静态变量：系统日志 */
    private static final Log logger = LogFactory.getLog(EnterprisePolicyInsuranceController.class);

    @Resource
    private EnterprisePolicyInsuranceService enterprisepolicyInsuranceService;

    @PostMapping("/getEnterprisePolicyInfoInsurance")
    public BaseResponse<EnterprisePolicyBO> enterprisePolicyInfoInsurance(@RequestBody EnterprisePolicyInfoVO enterprisePolicyInfoVO) {
        logger.info("查询企业单详情");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getEnterprisePolicyInfoInsurance(enterprisePolicyInfoVO));
    }

    @PostMapping(value = "/getEnterprisePolicyPreservationInsurance")
    public BaseResponse<PreservationBO> enterprisePolicyPreservationInsurance(@RequestBody PolicyInfoPageVO policyInfoPageVO) {
        logger.info("调用查询企业单保全信息外部接口");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getEnterprisePolicyPreservationInsurance(policyInfoPageVO));
    }

    @PostMapping(value = "/getEnterprisePolicyClaimsInsurance")
    public BaseResponse<EnterpriseClaimsBO> enterprisePolicyClaimsInsurance(@RequestBody PolicyInfoPageVO policyInfoPageVO) {
        logger.info("调用查询企业单理赔信息外部接口");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getEnterprisePolicyClaimsInsurance(policyInfoPageVO));
    }

    @PostMapping(value = "/getEnterprisePolicyUserListInsurance")
    public BaseResponse<PolicyUserListBO> enterprisePolicyUserListInsurance(@RequestBody PolicyUserListVO policyUserListVO) {
        logger.info("查询企业单人员清单接口");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getEnterprisePolicyUserListInsurance(policyUserListVO));
    }

    @PostMapping(value = "/getPreservationListByEnterPrisePolicyInsurance")
    public BaseResponse<EnterprisePreservationProgressInfoBO> preservationListByEnterPrisePolicyInsurance(@RequestBody EnterprisePreservationVO enterprisePreservationVO) {
        logger.info("查询企业单保全进度列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getPreservationListByEnterPrisePolicyInsurance(enterprisePreservationVO));
    }

    @PostMapping(value = "/getPreservationInfoByEnterPrisePolicyInsurance")
    public BaseResponse<EnterprisePreservationProgressInfoBO> preservationInfoByEnterPrisePolicyInsurance(@RequestBody PreservationProgressInfoVO preservationProgressInfoVO) {
        logger.info("查看企业单保全进度详情");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getPreservationInfoByEnterPrisePolicyInsurance(preservationProgressInfoVO));
    }

    @PostMapping(value = "/getClaimsProgressListByEnterprisePolicyInsurance")
    public BaseResponse<EnterpriseClaimsProgressBO> claimsProgressListByEnterprisePolicyInsurance(@RequestBody EnterpriseClaimsVO enterpriseClaimsVO) {
        logger.info("查询企业单理赔进度列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getClaimsProgressListByEnterprisePolicyInsurance(enterpriseClaimsVO));
    }

    @PostMapping(value = "/getClaimsProgressUserListByEnterprisePolicyInsurance")
    public BaseResponse<EnterpriseClaimsProgressBO> claimsProgressUserListByEnterprisePolicyInsurance(@RequestBody PolicyUserListVO policyUserListVO) {
        logger.info("查询企业单理赔进度--个人列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getClaimsProgressUserListByEnterprisePolicyInsurance(policyUserListVO));
    }

    @PostMapping(value = "/getClaimsProgressBatchListByEnterprisePolicyInsurance")
    public BaseResponse<EnterpriseClaimsProgressBO> claimsProgressBatchListByEnterprisePolicyInsurance(@RequestBody PolicyInfoPageVO policyInfoPageVO) {
        logger.info("查询企业单理赔进度--批次列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getClaimsProgressBatchListByEnterprisePolicyInsurance(policyInfoPageVO));
    }

    @PostMapping(value = "/getNewContractInfoByEnterprisePolicyInsurance")
    public BaseResponse<EnterprisePolicyNewContractBO> newContractInfoByEnterprisePolicyInsurance(@RequestBody EnterprisePolicyNewContractInfoVO enterprisePolicyNewContractInfoVO) {
        logger.info("查看企业单新契约详情");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getNewContractInfoByEnterprisePolicyInsurance(enterprisePolicyNewContractInfoVO));
    }

    @PostMapping(value = "/getNewContractListByEnterprisePolicyInsurance")
    public BaseResponse<EnterprisePolicyNewContractBO> newContractListByEnterprisePolicyInsurance(@RequestBody EnterprisePolicyNewContractVO enterprisePolicyNewContractVO) {
        logger.info("查询企业单新契约列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getNewContractListByEnterprisePolicyInsurance(enterprisePolicyNewContractVO));
    }

    @PostMapping(value = "/getNewContractIUserListByEnterprisePolicyInsurance")
    public BaseResponse<PolicyUserListBO> newContractIUserListByEnterprisePolicyInsurance(@RequestBody EnterprisePolicyNewContractUserListVO enterprisePolicyNewContractUserListVO) {
        logger.info("查询企业单人员清单接口");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getNewContractUserListByEnterprisePolicyInsurance(enterprisePolicyNewContractUserListVO));
    }

    @PostMapping(value = "/getExpirationPolicyListByEnterprisePolicyInsurance")
    public BaseResponse<EnterpriseExpirationPolicyBO> expirationPolicyListByEnterprisePolicyInsurance(@RequestBody EnterpriseExpirationPolicyVO enterpriseExpirationPolicyVO) {
        logger.info("查询企业单满期信息列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getExpirationPolicyListByEnterprisePolicyInsurance(enterpriseExpirationPolicyVO));
    }

    @PostMapping(value = "/getRenewalPolicyListByEnterPrisePolicyInsurance")
    public BaseResponse<EnterpriseRenewalPolicyBO> renewalPolicyListByEnterPrisePolicyInsurance(@RequestBody EnterpriseRenewalPolicyVO enterpriseRenewalPolicyVO) {
        logger.info("查询企业单续期信息列表");
        return RespGenerator.returnOK(enterprisepolicyInsuranceService.getRenewalPolicyListByEnterPrisePolicyInsurance(enterpriseRenewalPolicyVO));
    }

}
